<?php

defined('APPLICATION_PATH') || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../project_perso'));

include("db.php");

$base_url = "http://dev.leofulgencio.com/project_perso/";

function get_header() {
	include('/header.php');
}

function get_footer() {
	include('footer.php');
}

function get_sidebar() {
	include('sidebar.php');
}

function get_job_info() {
	include('agency_calendar/job/job_info.php');
}

$type = array(
	"Job",
	"Option",
	"Reminder",
	"Fitting",
	"GoSee",
	"Casting",
	"Unavailable",
	"Runway",
	"Test",
	"Appointment"
);

function get_agent_name($fname, $lname) {
	$fullname = $fname . " " . $lname;
	return $fullname;
}

function get_agency_name($agency) {
	return $agency;
}

function get_job_tabs() {
	include('agency_job_tabs.php');
}

$imgurl = array(
	'job' => $base_url . "images/job.png",
	'option' => $base_url . "images/option.png",
	'add' => $base_url . "images/plus.png"
);

$url = $_SERVER['REQUEST_URI'];
$url_split = explode('/', $url);

$test = "WHOOPS!";

//$logged_in_user = TRUE;

function redirect($location) {
	header('Location: ' . $location);
	exit();
}

function logged_in() {
	return isset($_SESSION['user_id']);
}

function confirm_logged_in() {

	if(!logged_in()) {
		//echo "Access denied -- you NEED to <a href='login.php'>Login</a> <br>";
		redirect("http://dev.leofulgencio.com/project_perso/");
	}
}


if(!isset($_SESSION['agency'])) {
	$company = "Persofolio";
} else {
	$company = $_SESSION['agency'];
}




/*function get_icon() {
	include('images/persofolio2.png');
}*/
